package d3w.com;

import android.app.TabActivity;
import android.content.res.Resources;
import android.os.Bundle;
import android.widget.ArrayAdapter;
import android.widget.ListView;
import android.widget.TabHost;
import android.widget.TextView;

public class linhaLogradouro extends TabActivity {
	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.linhalogr);
		Resources res = getResources(); // Resource object to get Drawables
        TabHost tabHost = getTabHost();  // The activity TabHost
        TabHost.TabSpec spec;  // Resusable TabSpec for each tab
        Bundle b = getIntent().getExtras();
        String nomeLinha = b.getString("nomeLinha"); 
        TextView nome = new TextView(this);
        nome = (TextView) findViewById(R.id.textView1);
        nome.setText(nomeLinha);
        String[] tb1 = new String[] { "1","1","1","1","1","1","1","1","1"};
        String[] tb2 = new String[] { "2","2","2","2","2","2","2","2","2"};
        ListView ls1 = new ListView(this);
        ListView ls2 = new ListView(this);
        ls1 = (ListView) findViewById(R.id.listView_tab1);
        ls2 = (ListView) findViewById(R.id.listView_tab2);
        ls1.setAdapter(new ArrayAdapter<String>(this, android.R.layout.simple_list_item_1, tb1));
        ls2.setAdapter(new ArrayAdapter<String>(this, android.R.layout.simple_list_item_1, tb2));
        // Initialize a TabSpec for each tab and add it to the TabHost
        spec = tabHost.newTabSpec("Tab 1").setIndicator("Tab 1",
                          res.getDrawable(R.drawable.ic_tab_linhas))
                      .setContent(R.id.listView_tab1);
        tabHost.addTab(spec);
        
        spec = tabHost.newTabSpec("Tab 2").setIndicator("Tab 2",
                res.getDrawable(R.drawable.ic_tab_linhas))
            .setContent(R.id.listView_tab2);
        tabHost.addTab(spec);

        
        
	}
}
